package com.shroo8.footballbloglib.dao.constants;

public interface DataAccessConstants {
	/*
	table articles definition:
		article_id VARCHAR(36) NOT NULL,
		author_id VARCHAR(36) NOT NULL,
		article_title VARCHAR (100) NOT NULL,
		article_text VARCHAR (10000) NOT NULL,
		average_rating DECIMAL(2,1),
		number_of_ratings INT,
		created_on DATETIME NOT NULL
	 */
    String ARTICLES_ARTICLE_ID = "article_id";
    String ARTICLES_AUTHOR_ID = "author_id";
    String ARTICLES_ARTICLE_TITLE = "article_title";
    String ARTICLES_ARTICLE_TEXT = "article_text";
    String ARTICLES_CREATED_ON = "created_on";
    String ARTICLES_AVERAGE_RATING = "average_rating";
    String ARTICLES_NUMBER_OF_RATINGS = "number_of_ratings";
    /*
	table users definition:
		user_id VARCHAR(36) NOT NULL,
		user_type ENUM('twitter','facebook') NOT NULL,
		user_external_id INT NOT NULL,
		user_screen_name VARCHAR(50) NOT NULL,
		user_name VARCHAR(50),
		user_pic_url VARCHAR (100),
		user_big_pic_url VARCHAR (100),
		user_mini_pic_url VARCHAR (100),
		created_on DATETIME NOT NULL
	 */
    String USERS_USER_ID = "user_id";
    String USERS_USER_TYPE = "user_type";
    String USERS_USER_EXTERNAL_ID = "user_external_id";
    String USERS_USER_SCREEN_NAME = "user_screen_name";
    String USERS_USER_NAME = "user_name";
    String USERS_USER_PIC_URL = "user_pic_url";
    String USERS_USER_BIG_PIC_URL = "user_big_pic_url";
    String USERS_USER_MINI_PIC_URL = "user_mini_pic_url";
    String USERS_CREATED_ON = "created_on";

    /*
	table users definition:
		comment_id VARCHAR(36) NOT NULL,
		article_id VARCHAR(36) NOT NULL,
		user_id VARCHAR(36) NOT NULL,
		comment_text VARCHAR(140) NOT NULL,
		created_on DATETIME NOT NULL
	 */
    String COMMENTS_COMMENT_ID = "comment_id";
    String COMMENTS_ARTICLE_ID = "article_id";
    String COMMENTS_USER_ID = "user_id";
    String COMMENTS_COMMENT_TEXT = "comment_text";
    String COMMENTS_CREATED_ON = "created_on";

    /*
     * Stored Procedures & In/Out parameters
     */
    String SP_CREATE_ARTICLE = "sp_create_article";
    String SP_CREATE_ARTICLE_OUT_PARAMETER = "out_article_id";    
    String SP_GET_ARTICLE = "sp_get_article_by_id";        
    String SP_GET_USER_ID = "sp_get_user_id";
    String SP_GET_USER_ID_OUT_PARAMETER = "out_user_id";
    String SP_CREATE_USER = "sp_create_user";
    String SP_CREATE_USER_OUT_PARAMETER = "out_user_id";
    String SP_GET_ARTICLES_BY_USER_TYPE_AND_EXTERNAL_ID = "sp_get_articles_by_user_type_and_external_id";
    String SP_DELETE_ARTICLE = "sp_delete_article";
    String SP_UPDATE_ARTICLE = "sp_update_article";
    String SP_UPDATE_ARTICLE_RATING = "sp_update_article_rating";
    String SP_UPDATE_ARTICLE_RATING_IN_Rating = "in_article_rating";
    String SP_CREATE_COMMENT = "sp_create_comment";
    String SP_GET_ARTICLE_COMMENTS = "sp_get_article_comments";

}
